package com.b2c.beans;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;

import com.b2c.entity.EticMarka;
import com.b2c.services.EticMarkaController;

@ManagedBean(name = "markaBean")
@ViewScoped
public class MarkaBean implements Serializable {
	private String markaId;
	private EticMarka eticMarka;

	public String getMarkaId() {
		return markaId;
	}

	public void setMarkaId(String markaId) {
		this.markaId = markaId;
	}

	public EticMarka getEticMarka() {
		return eticMarka;
	}

	public void setEticMarka(EticMarka eticMarka) {
		this.eticMarka = eticMarka;
	}

	public void getMarka() {
		EticMarkaController controller = new EticMarkaController();
		eticMarka = controller.getMarka(Long.parseLong(markaId));
		System.out.println("markaad:" + eticMarka.getAd());
	}

}
